#[[
#@layoutT("修改页")
#define main()

	<form action="javascript:void(0)" class="layui-form layui-form-pane f-form" method="post" lay-filter='saveForm'>
		<input type="hidden" class="layui-input" name="object" value="sys_tree"/>
		<input type="hidden" class="layui-input" name="primaryKey" value="id"/>
		<input type="hidden" class="layui-input" name="id" value=""/>
		<input type="hidden" class="layui-input" name="parent_id" value=""/>
			#(token)
		<div class="layui-row layui-col-space1 task-row">
		#@colStart("所属分类",12)
			<input type="text" name="type" value="" class="layui-input layui-disabled" lay-verType='tips'lay-verify="required|" required maxlength="50" placeHolder="必填" readonly="readonly" />
		#@colEnd()
		</div>
		
		<div class="layui-row layui-col-space1 task-row">
		#set(req=true)
		#@colStart("名称",12)
			<input type="text" name="name"  value="" class="layui-input"  lay-verType='tips' lay-verify="required|" maxlength="50" placeHolder="必填" required />
		#@colEnd()
	 	</div>	
		
		<div class="layui-row layui-col-space1 task-row">
		#@colStart("序号",12)
			<input type="number" name="order_no" value="1" class="layui-input"/>
		#@colEnd()
		</div>
		
		#@submitButton()
	</form>
	
#end

<!-- 获取对象数据 -->
#define js()
<script type="text/javascript">
	$(function(){
		var searchURL=window.location.search;
		searchURL=searchURL+"&object=sys_tree&primaryKey=id";
		var editUrl="#(path)/portal/form/business/getModel"+searchURL;
		//发送请求
		$.post(editUrl, {}, function(ret) {
			if (ret.state=="ok") {
				var data=ret.data;
				//页面赋值
				$.each(data,function(key,val){
					$('input[name="'+key+'"]').val(val);
				});
			} else {
				warn(ret.msg);
			}
		});
	});
	
</script>
#end

<!-- 保存数据 -->
#define layuiFunc()
	var saveUrl="#(path)/portal/form/business/update";
#end
]]#